package com.Druid1;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserDao {
	@Select("select * from user where id=#{id}")
	user getById(@Param("id") int id);

	@Select("select * from user")
	List<user> getAll();

	@Update("update user set age=50  where id =#{id}")
	boolean update(@Param("id") int id);

	@Update("update user set age=age+1  where id =#{id}  and age =#{age}")
	boolean update1(@Param("id") int id, @Param("age") int age);

}
